import Vue from "vue";
import VueI18n from "vue-i18n";
Vue.use(VueI18n);

var messages = {
    'zh-CN': require("../../public/lang/zh-CN.json"),
    'en-US': require("../../public/lang/en-US.json")
};

const i18n = new VueI18n({
    locale: localStorage.getItem('lang') ? localStorage.getItem('lang') : 'zh-CN', // set locale
    messages // set locale messages
});

export default i18n;